<template>
	<view>
		<view class="flex category_container relative">
			<!-- <view :class="['navbar',isScroll === true ? 'nav-fixed':'nav-normal']" :style="{ 'height': navheight +parseInt(slotheight)+ 'px' ,'background-color' : bgcolor}">
				<view :style="{ 'height': navheight + 'px' ,'background-color' : bgcolor}">
					<view :style="{'height': statusBarHeight +'px'}"></view>
					<view class="header" @click="getTool" :style="{'height': menuHeight +'px'}">
						<view v-if="xiao" class="hai" :style="{'line-height': menuHeight +'px'}">
							海鲜冻品
						</view>
					</view>
				</view>

			</view>
			<image src="https://static-1310167831.cos.ap-nanjing.myqcloud.com/uploads/20230411/488ca0086209e335401bfbcc2e8ff224.png" class="bg" mode="widthFix"></image> -->
			<view class="shang_city">
						<!-- <view style="line-height: 100rpx;color: #000000;font-size: 36rpx;font-weight: 600;padding: 0 30rpx;">
							{{one_list.name || ''}}
						</view> -->
				<view class="first_category_item flex items-center justify-center" @tap="handleTap('picker1',a.id,a.is_child,b,a.name)" style="width: 100%;text-align: center;" v-for="(a,b) in one_list.list" :key='b'>
					<image :src="a.main_image" style="width:60rpx;height: 60rpx;" ></image>
					<view class="pl10 category_name" style="font-size: 24rpx;" :class="firstStatus==b?'active':''">
						{{a.name}}
					</view>
				</view>
			</view>
			<view class="second_category" style="background-color: #FFFFFF">
				<scroll-view scroll-y="true">
					<view @click="erji(b)" style="width: 33.33333%;float: left;text-align: center;margin-bottom: 30rpx;" v-for="(a,b) in twolist" :key='b'>
						<image :src="a.main_image" style="width:60rpx;height: 60rpx;" ></image>
						<view style="font-size: 24rpx;" :class="a.check?'active':'a'" class="yihang">
							{{a.name}}
						</view>
					</view>
				</scroll-view>
				<view class="footer" v-if="false">
					<button @click="chongzhi"
						style="flex: 1;background-color: #f3f3f3;color: #333333;margin-right: 20rpx;font-weight: 600;"
						type="default">重置</button>
					<button @click="haode" style="flex: 1;background-color: #000000;color: #FFFFFF;"
						type="default">确定</button>
				</view>
			</view>
			<view class="second_category" v-if="false">
				<view v-if="fanwei_list.length>0" style="overflow: hidden;width: 92%;margin: 20rpx auto;" >
					<view v-for="(item,index) in fanwei_list" :key='index' style="float: left;line-height: 60rpx;height: 60rpx;padding: 0 30rpx;margin: 10rpx;font-size: 26rpx;color: #333333;background-color: #F3F3F3;border-radius: 30rpx;display: inline-block;">
						{{item.name || ''}} <text @click="jianshao(index,item.id)" style="color: #999999;font-size: 26rpx;margin-left: 16rpx;display: inline-block;float: right;" class="iconfont icon-guanbi1"></text>
					</view>
				</view>
			</view>
			<!-- <button @click="queren" :disabled="fa_bu" style="width: 92%;margin: 30rpx auto 180rpx;background-color: #1fb0ac;height: 90rpx;line-height: 90rpx;color: #FFFFFF;text-align: center;border-radius: 45rpx;font-size: 30rpx;" type="default">确认</button> -->
		</view>

		<view class="bottom_container">
			<textarea v-model="zidingyi" :maxlength='10' placeholder="如未找到您的产品分类，请在此输入您的产品类别" placeholder-style="color:#666666;font-size:30rpx;" style="box-sizing: border-box;width: 92%;padding: 20rpx;border-radius: 10rpx;line-height: 40rpx;color: #333333;font-size: 30rpx;background-color: #FFFFFF;margin: 20rpx auto;height: 140rpx;" />

			<view v-if="chanpin_list.length>0" class="input" style="width: 92%;margin: 0 auto;">
				<text style="width: 100%;">历史产品分类</text>
				<!-- <input style="text-align: right;" type="text"   placeholder="收货人手机号" v-model="mobile"/> -->
				<!-- <view @click="xzcpfl" style="flex: 1;text-align: right;">
					请选择产品分类<text class="iconfont icon-xiangyou"></text>
				</view> -->
			</view>
			<view v-if="chanpin_list.length>0" style="overflow: hidden;margin: 20rpx 0;" >
				<view @click="dianji(index)" :class="item.check?'actives':'as'" v-for="(item,index) in chanpin_list" :key='index' style="float: left;line-height: 60rpx;height: 60rpx;padding: 0 30rpx;margin: 10rpx;font-size: 26rpx;border-radius: 30rpx;display: inline-block;">
					{{item.name}}
				</view>
			</view>

		</view>
		<button @click="queding" style="width: 92%;margin: 30rpx auto 180rpx;background-color: #1fb0ac;height: 90rpx;line-height: 90rpx;color: #FFFFFF;text-align: center;border-radius: 45rpx;font-size: 30rpx;" type="default">确定</button>

		<lb-picker ref="picker1" v-model="xueli" mode="selector" :dataset="{ name: xueli }" :list="listarr"
			@confirm="handleConfirm">
		</lb-picker>
		<lb-picker ref="picker2" v-model="xueli1" mode="selector" :dataset="{ name: xueli1 }" :list="listarr1"
			@confirm="handleConfirm1">
		</lb-picker>


		<uni-popup id="popup" ref="popup" :type="type_status" :animation="true">
			<view class="" style="background-color: #FFFFFF;padding:20upx 30upx 0;border-radius: 20upx;width: 500rpx;">
				<view
					style="text-align: center;height: 100upx;line-height: 100upx;color: #333333;font-weight: 600;font-size: 32rpx;">
					提示
				</view>
				<view class="popup-content" style="text-align: center;font-size: 28upx;">请授权您的用户信息</view>
				<view class="footer">
					<button @click="quxiao"
						style="flex: 1;background-color: #f3f3f3;color: #333333;margin-right: 20rpx;font-weight: 600;"
						type="default">取消</button>
					<button @click="login" lang="zh_CN" style="flex: 1;background-color: #000000;color: #FFFFFF;"
						open-type="getUserInfo">确定</button>
					<!-- <button @click="submitLink" type="default" class="submit">确认提交</button> -->
				</view>
			</view>
		</uni-popup>
		<uni-popup id="popup" ref="popup1" :type="type_status" :animation="true">
			<view class="" style="background-color: #FFFFFF;padding:20upx 30upx 0;border-radius: 20upx;width: 500rpx;">
				<view
					style="text-align: center;height: 100upx;line-height: 100upx;color: #333333;font-weight: 600;font-size: 32rpx;">
					提示
				</view>
				<view class="popup-content" style="text-align: center;font-size: 28upx;">请授权您的手机号</view>
				<view class="footer">
					<button @click="quxiao1"
						style="flex: 1;background-color: #f3f3f3;color: #333333;margin-right: 20rpx;font-weight: 600;"
						type="default">取消</button>
					<button @getphonenumber="login1" style="flex: 1;background-color: #000000;color: #FFFFFF;"
						open-type="getPhoneNumber">确定</button>

				</view>
			</view>
		</uni-popup>
		<uni-popup id="popup" ref="popup2" :type="type_status" :animation="true">

		</uni-popup>
		<noLoginToast ref="noLoginToast"/>
		<!-- <mrhardTabbar></mrhardTabbar> -->
	</view>
</template>

<script>
	import uniPopup from '@/components/uni-popup/uni-popup2.vue'
	import LbPicker from '@/components/lb-picker'
	import mrhardTabbar from "../../components/mrhard-tabbar.vue";
	export default {
		components: {
			mrhardTabbar,
			LbPicker,
			uniPopup
		},
		data() {
			return {
				scrollTop: 0,
				navheight: 0,
				statusBarHeight: 0,
				menuHeight: 0,
				haveBack: false,
				btnHeight: 30,
				btnWidth: 70,
				isScroll:true,
				slotheight:'0',

				xiao:true,
				one_list:{},
				twolist:[],
				xueli:'',
				listarr:[],
				xueli1:'',
				listarr1:[],
				threelist:[],
				one_id:'',
				two_id:'',
				type_status:'center',
				status:'-1',
				type:'',
				one_index:0,
				two_index:'',
				three_index:'',
				id:'',
				fanwei_list:[],
				fanwei_id:[],
				zidingyi:'',
				lishi_list:[],
				zixuan_id:[],
				chanpin_list:[],
				idfanwei_list:[],
				firstStatus: 0
			}
		},
		onLoad(option) {
			console.log(option,123456789)
			this.type=option.type
			this.shangci()
			this.id=option.id
			// this.lishi_list=JSON.parse(option.lishi_list)
			if(option.fanwei_id){
				this.fanwei_id=option.fanwei_id.split(',')
				if(option.fanwei_list!=''){
					this.fanwei_list=JSON.parse(option.fanwei_list)
				}

			}
			console.log(this.fanwei_list,741)

			this.zidingyi=option.zidingyi
			this.one()
		},
		// onShow() {
		// 	if(this.daid){
		// 		this.post('api/voice/publish_category','',true).then(res=>{
		// 			console.log(res,123456)
		// 			if(res.code==1){
		// 				for(let i=0;i<res.data[0].list.length;i++){
		// 					if(this.daid==res.data[0].list[i].id){
		// 						console.log(i,1222222222)
		// 						this.status=i
		// 						return
		// 					}
		// 				}
		// 			}
		// 		})
		// 	}

		// },
		// onHide:function(){
		// 	console.log(1111)
		// 	uni.removeStorageSync('daid')
		// 	this.status='-1'
		// },
		methods:{

			// 上次发帖习惯
			shangci:function(){
				this.post('api/voice/pre_voice','',true).then(res=>{
					if(res.code==1){
						this.idfanwei_list=res.data.voice_manage_id.split(',')
						for(let i=0;i<res.data.manage_data.length;i++){
							this.chanpin_list.push(
								{
									name:res.data.manage_data[i].one+'-'+res.data.manage_data[i].two,
									check:false
								}
							)
						}

					}
				})
			},

			jianshao:function(index,id){
				// this.fanwei_id.splice(index,1)
				let arr=[]
				this.fanwei_list.splice(index,1)
				for(let i=0;i<this.fanwei_id.length;i++){
					if(id!=this.fanwei_id[i]){
						arr.push(this.fanwei_id[i])
					}
				}
				this.fanwei_id=arr
				console.log(this.fanwei_id,this.fanwei_list,1234789)

			},
			queren:function(){
				let pages = getCurrentPages();
				let prevPage = pages[ pages.length - 2 ];  //上一页页面实例
				//修改上一页data里面的searchVal参数值为1211
				// prevPage.$vm.daid=this.one_list.list[this.status].id
				// prevPage.$vm.fenlei=this.one_list.list[this.status].name
				console.log(prevPage.$vm.daid,147)
				return
				prevPage.$vm.daid=''
				prevPage.$vm.fenlei=''
				uni.navigateBack({  //uni.navigateTo跳转的返回，默认1为返回上一级
					delta: 1
				});
			},
			getSysHeightInfo() {
				const that = this
				let statusBarHeight, menuButtonObject, menuHeight, navheight, haveBack, btnHeight, btnWidth

				statusBarHeight = uni.getSystemInfoSync().statusBarHeight
				//#ifdef MP-WEIXIN
				menuButtonObject = uni.getMenuButtonBoundingClientRect()
				menuHeight = menuButtonObject.height + (menuButtonObject.top - statusBarHeight) * 2
				navheight = menuHeight + statusBarHeight
				btnHeight = menuButtonObject.height
				btnWidth = menuButtonObject.width
				//#endif
				//#ifdef H5
				menuHeight = 44
				navheight = menuHeight + statusBarHeight
				btnHeight = 30
				btnWidth = 70
				//#endif
				if (getCurrentPages().length === 1) { // 当只有一个页面时
					haveBack = false;
				} else {
					haveBack = true;
				}
				that.navheight = navheight
				that.statusBarHeight = statusBarHeight
				that.menuHeight = menuHeight
				that.haveBack = haveBack
			},

			// 一级
			one:function(){
				uni.showLoading({
					title: ''
				})
				this.post('api/voice/publish_category','',true).then(res=>{
					console.log(res)
					if(res.code==1){
						console.log(this.type)
						console.log(res.data[this.type])
						this.one_list=res.data[this.type]
						this.two_tan(this.one_list.list[0].id)
					}
				})
			},
			async handleTap(name,id,index,b,mingzi) {
				console.log(22222)
				let isLogin = await this.$refs.noLoginToast.open()
				if (isLogin) {
					let isHasMobile = await this.$refs.noLoginToast.getPhoneNumber()
					if (!isHasMobile) {
						return
					}
				} else {
					return
				}
					this.firstStatus = b
					this.one_index=b
					this.two_tan(id)
					return
					if(index==2){
						console.log(this.fanwei_id,id,123456)
						// this.status=b
						// console.log(b)
						// console.log(this.status)
						for(let i=0;i<this.fanwei_id.length;i++){
							if(this.fanwei_id[i]==id){
								uni.showToast({
									title:'您已经选择了！',
									icon:'none',
									duration:1500
								})
								return
							}else{

							}
						}
						this.fanwei_id.push(id)
						this.fanwei_list.push(mingzi)
						// for(let i=0;i<this.lishi_list.length;i++){
						// 	for(let j=0;j<this.fanwei_list.length;j++){
						// 		if(this.fanwei_list[j]==this.lishi_list[i].name){
						// 			this.lishi_list[i].check=true
						// 		}else{
						// 			this.lishi_list[i].check=false
						// 		}
						// 	}
						// }
					}else{
						console.log(b)
						this.one_index=b
						this.listarr=[]
						this.twolist=[]
						this.one_id=id
						this.two(this.one_id,name)
					}
			},
			two_tan:function(id){
				this.post('api/voice/manage',{id:id},true).then(res=>{
					console.log(res)
					if(res.code==1){
						uni.hideLoading()
						// this.$refs.popup2.open()
						this.twolist=res.data
						for(let m=0;m<this.twolist.length;m++){
							for(let i=0;i<this.fanwei_id.length;i++){
								if(this.fanwei_id[i]==this.twolist[m].id){
									this.twolist[m].check=true
									break
								}else{
									this.twolist[m].check=false
								}
							}
						}

					}
				})
			},
			erji:function(b){
				this.twolist[b].check=!this.twolist[b].check
				if(!this.twolist[b].check){
					let arr =[]
					for(let i=0;i<this.fanwei_id.length;i++){
						if(this.twolist[b].id!=this.fanwei_id[i]){
							arr.push(this.fanwei_id[i])
						}
					}
					this.fanwei_id=arr
					let shu_arr =[]
					for(let i=0;i<this.fanwei_list.length;i++){
						if(this.twolist[b].id!=this.fanwei_list[i].id){
							shu_arr.push(this.fanwei_list[i])
						}
					}
					this.fanwei_list=shu_arr
				}
				this.haode()
				this.$forceUpdate()
			},
			chongzhi:function(){
				for(let m=0;m<this.twolist.length;m++){
					this.twolist[m].check=false
				}
				let arr=[]
				for(let i=0;i<this.fanwei_list.length;i++){
					if(this.fanwei_list[i].name.indexOf(this.one_list.list[this.one_index].name)==-1){
						arr.push(this.fanwei_list[i])
					}
				}
				this.fanwei_list=arr

				let arr_id=[]
				for(let i=0;i<this.fanwei_id.length;i++){
					for(let m=0;m<this.twolist.length;m++){
						if(this.fanwei_id[i]==this.twolist[m].id){

						}else{
							arr_id.push(this.fanwei_id[i])
							break
						}

					}

				}
				this.fanwei_id= this.fanwei_id.filter(item1 => !this.twolist.some(item2 => item2.id == item1))
				console.log(this.fanwei_list,this.fanwei_id,123456)
				this.$forceUpdate()
			},
			haode:function(){
				for(let m=0;m<this.twolist.length;m++){
					if(this.twolist[m].check){
						this.fanwei_id.push(this.twolist[m].id)
						this.fanwei_list.push(
							{
								name:this.one_list.list[this.one_index].name+'-'+this.twolist[m].name,
								id:this.twolist[m].id
							}
						)
					}
				}
				this.fanwei_id=this.repart(this.fanwei_id)
				this.fanwei_list=this.deWeight(this.fanwei_list)

				this.$forceUpdate()
			},
			dianji:function(index){
				console.log(index)
				this.fanwei_id.push(this.idfanwei_list[index])
				this.fanwei_list.push(
					{
						name:this.chanpin_list[index].name,
						id:this.idfanwei_list[index]
					}
				)
				this.fanwei_id=this.repart(this.fanwei_id)
				this.fanwei_list=this.deWeight(this.fanwei_list)

				this.$forceUpdate()
				return
				if(this.id_list.length<=0){
					this.id_list.push(this.idfanwei_list[index])
					this.xuan_cp_list.push(this.chanpin_list[index].name)
				}else{
					for(let i=0;i<this.id_list.length;i++){
						if(this.id_list[i]==this.idfanwei_list[index]){
							return
						}
					}
					this.id_list.push(this.idfanwei_list[index])
					this.xuan_cp_list.push(this.chanpin_list[index].name)
				}

			},
			// 去重
			repart:function(arr) {
			            // 利用sort排序
			            arr = arr.sort();
			            // 创建新数组
			            var brr = [];
			            // 遍历数组
			            for (var i = 0; i < arr.length; i++) {
			                // 判断语句
			                if (arr[i] !== arr[i - 1]) {
			                    brr.push(arr[i])
			                }
			            }
			            return brr;
			        },

			deWeight:function(arr) {
			    for (var i = 0; i < arr.length - 1; i++) {
			        for (var j = i + 1; j < arr.length; j++) {
			            if (arr[i].name == arr[j].name) {
			                arr.splice(j, 1);
			                //因为数组长度减小1，所以直接 j++ 会漏掉一个元素，所以要 j--
			                j--;
			            }
			        }
			    }
			    return arr;
			},
			two:function(id,name){
				this.post('api/voice/manage',{id:id},true).then(res=>{
					console.log(res)
					if(res.code==1){
						if(res.data.length>0){
							this.twolist=res.data
							for(let i=0;i<res.data.length;i++){
								this.listarr.push(res.data[i].name)
							}
							this.$refs[name].show()
						}else{
							console.log(this.one_list,'liuynhjkl')
							this.fanwei_id.push(this.one_id)
							this.fanwei_list.push(this.one_list.list[this.one_index].name)
						}

					}
				})
			},

			handleConfirm(e) {

				let that=this
				let index=e.index[0] || e.index
				console.log(index,123456789456)
				// if(index){
					this.two_index=index
					this.two_id=this.twolist[index].id
					console.log(this.one_id,this.two_id)
					if(this.twolist[index].is_child==1){
						this.three(this.two_id)
						this.$refs['picker2'].show()
					}else{
						for(let i=0;i<this.fanwei_id.length;i++){
							if(this.fanwei_id[i]==this.two_id){
								uni.showToast({
									title:'您已经选择了！',
									icon:'none',
									duration:1500
								})
								return
							}else{

							}
						}
						this.fanwei_id.push(this.two_id)
						this.fanwei_list.push(this.one_list.list[this.one_index].name+'-'+this.twolist[this.two_index].name)
						console.log(this.fanwei_id,147258)
					}
				// }else{
				// 	console.log(1234,'liuyang')
				// }


			},
			three:function(id){
				this.threelist=[]
				this.listarr1=[]
				console.log(id)

				this.post('api/voice/manage',{id:id},true).then(res=>{
					console.log(res)
					if(res.code==1){

						this.threelist=res.data
						for(let i=0;i<this.threelist.length;i++){
							this.listarr1.push(this.threelist[i].name)
						}
					}
				})
			},
			handleConfirm1(e) {
				let that=this
				let index=e.index[0] || e.index
				console.log(index,147246)
				this.three_index=index
				this.three_id=this.threelist[index].id
				console.log(this.one_id,this.two_id,this.three_id)
				// let id=''
				// if(this.three_id==''){
				// 	id=this.two_id
				// }else{
				// 	id=this.three_id
				// }
				for(let i=0;i<this.fanwei_id.length;i++){
					if(this.fanwei_id[i]==this.three_id){
						uni.showToast({
							title:'您已经选择了！',
							icon:'none',
							duration:1500
						})
						return
					}else{

					}
				}
				this.fanwei_id.push(this.three_id)
				this.fanwei_list.push(this.one_list.list[this.one_index].name+'-'+this.twolist[this.two_index].name+'-'+this.threelist[this.three_index].name)


			},
			queding:function(){
				let pages = getCurrentPages();
				let prevPage = pages[ pages.length - 2 ];
				prevPage.$vm.cishu=1
				prevPage.$vm.id_list=this.fanwei_id
				prevPage.$vm.xuan_cp_list=this.fanwei_list
				prevPage.$vm.zidingyi=this.zidingyi
				prevPage.$vm.daid=''
				prevPage.$vm.fenlei=''
				uni.navigateBack({
					delta: 1
				});
			},
			// 发布帖子
			fbtz:function(){
				uni.navigateTo({
					url:'../wenzhang/fbtz'
				})
			},

			quxiao1: function() {
				this.$refs.popup1.close()
			},
			login1: function(e) {
				console.log(e)
				let that = this
				this.$refs.popup1.close()
				uni.login({
					provider: 'weixin',
					success: (code) => {
						console.log(code)
						this.post('api/wechat/phone', {
							code: code.code,
							iv: e.detail.iv,
							encryptedData: e.detail.encryptedData
						}, true).then(res => {
							console.log(res, '123455')
							if (res.code == 1) {
								uni.setStorageSync('mobile', res.data.phoneNumber)
								uni.setStorageSync('mobile2',res.data.mobile2)
							}else{
								uni.showToast({
									title: res.msg,
									icon: "none",
									duration: 1000
								})
							}

						})

					}
				})
			},


		},
		mounted() {
			const that = this
			this.getSysHeightInfo()
			//#ifdef H5
			window.onscroll = function() {
				var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
				if (scrollTop > 30) {
					that.isScroll = true
				} else {
					that.isScroll = false
				}
			}
			//#endif

		},
		onPageScroll(t) {

			t.scrollTop > 20 ? this.xiao = false : this.xiao = true;
			// t.scrollTop > 80 ? this.da = true : this.da = false;

		},
		watch: {
			scrollTop(newValue, oldValue) {
				//#ifdef MP-WEIXIN
				const that = this
				if (newValue > 1) {
					that.isScroll = true
				} else {
					that.isScroll = false
				}
				//#endif
			}
		}
	}
</script>

<style lang="scss">
	.actives{
		color: #fff;
		background-color: #1FB0AC;
	}
	.as{
		color: #333333;
		background-color: #F3F3F3;
	}
	.input {
		height: 100upx;
		width: 100%;
		box-sizing: border-box;
		padding: 30rpx 0;
		// margin-left: 40upx;
		border-bottom: 2upx solid #f0f0f0;
		display: flex;
		align-items: center;

		text {
			width: 176upx;
			font-size: 30upx;
			color: #333333;

		}

		input {
			flex: 1;
			font-size: 30upx;
			color: #333333;
		}
	}
	page{
		background-color: #F8F8F8!important;
		font-family: Demibold;
	}
	.active{
		color: #1fb0ac;
		font-weight: 600;
	}
	.a{
		color: #000000;
		font-weight: 500;
	}
	.bg{
		width: 100%;
	}
	.hai{
		text-align: center;
		font-size: 32rpx;
		color: #FFFFFF;
	}
	.sou {
		width: 100%;
		height: 80rpx;
		line-height: 80rpx;
		border-radius: 40rpx;
		color: #FFFFFF;
		font-size: 26rpx;
		box-sizing: border-box;
		padding: 0 30rpx 0 80rpx;
		background-color: rgba(255,255,255,.3);
	}

	.suo {
		color: #FFFFFF;
		opacity: 1;
		font-size: 26rpx;
	}

	.souicon {
		width: 30rpx;
		height: 30rpx;
		position: absolute;
		top: 50%;
		left: 30rpx;
		transform: translateY(-50%);

	}
	.addcity {
		position: absolute;
		top: 50%;
		left: 0;
		transform: translateY(-50%);
		font-size: 28rpx;
	}
	.category_container {
		.shang_city{
			width: 200rpx;
			// position: absolute;
			// left: 50%;
			// transform: translateX(-50%);
			// box-sizing: border-box;
			// padding-bottom: 200rpx;
			.first_category_item {
				height: 110rpx;
				line-height: 110rpx;
				.category_name {
					color: #666;
					&.active {
						color: #1FB0AC;
					}
				}
			}
		}
	}

	.lunbo{
		width: 92%;
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		box-sizing: border-box;
	}
	.second_category,
	.shang_city{
		height: calc(100vh - 440rpx);
		overflow: auto;
	}
	.second_category {
		width: 100%;
		width: calc(100% - 200rpx);
		background-color: #fff;
		padding: 34rpx 60rpx 0;
		box-sizing: border-box;
	}
	.bottom_container {
		background-color: #F8F8F8;
	}

	// 头部
	.navbar {
		width: 100%;
		overflow: hidden;
		top: 0;
		left: 0;
		z-index: 999;
		flex-shrink: 0;
		color: #fff;
		font-size: 16px;
	}

	.nav-normal {
		position: relative;
	}

	.nav-fixed {
		position: fixed;
	}

	.header {
		position: fixed;
		width: 100%;
	}

	.logo-centent {
		display: flex;
		align-items: center;
	}

	.logo-centent image {
		width: 260rpx;
		height: 68rpx;
		margin-left: 20rpx;
	}

	.hearder-status {
		display: flex;
		align-items: center;
		position: absolute;
		padding-left: 30rpx;
		height: 100%;
		z-index: 99999;

	}

	.header-title {
		height: 100%;
		left: 0;
		right: 0;
		position: absolute;
		margin: auto;
		text-align: center;
	}
	.header-title image{
		position: absolute;
		width:270rpx;
		height: 35rpx;
		top: 50%;
		left: 50%;
		transform: translate(-50%,-50%);
	}

	.header-title-left {
		height: 100%;
		left: 0;
		right: 0;
		position: absolute;
		margin: auto;
		text-align: left;
	}

	.back-text {
		margin-left: 7px;
		width: 100upx;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}

	.hearder-status .nav-title-left {
		display: flex;
		justify-content: space-between;
		align-items: center;
		color: rgba(0, 0, 0, .8);
		width: 100%;
		font-weight: bold;
	}
	.hearder-status .nav-btn {
		/* background-color: rgba(255, 255, 255, .5);
		border-radius: 15px; */
		display: flex;
		justify-content: space-between;
		align-items: center;
		color: rgba(0, 0, 0, .8);
		width: 50%;
		font-weight: bold;
	}

	.hearder-status .nav-btn .gotback,
	.hearder-status .nav-btn .gothome {
		flex: 1;
		text-align: center;
		font-size: 18px;
	}
	.Addslot {
		position: absolute;
		width: 100%;
	}
	.footer {
		display: flex;
		justify-content: space-between;
		border-top: 1px solid #f4f4f4;
		margin-top: 30rpx;
		padding-bottom: 20rpx;

		button {
			margin: 0 auto;
			width: 100%;
			background-color: #19BE6B;
			// width: 200upx;
			border-radius: 10upx;
			font-size: $uni-font-size-sm;
			// padding: 22upx 34upx;
			height: 80upx;
			font-size: 30rpx;
			line-height: 80upx !important;
			// line-height: 1;
			color: #FFFFFF;
		}

		button:after {
			border: 0;
		}
	}



</style>

